<?php 
global $forum_city,$city_info;
define('APP_URL', 'http://'.$_SERVER['HTTP_HOST'].'/file/app/'.$forum_city.'/hiici.apk');
?>
<?php (empty($_GET['app_version'])) ? : $_SESSION['app_version'] = true ?>
<?php if (empty($_SESSION['app_version'])) { ?>
<?php if (!empty($city_info['background_url'])) { ?>
<style type="text/css" media=screen>
body {  
	background:#f5f5f5 url(<?php echo $city_info['background_url'] ?>) repeat center center fixed; 	
}
</style>
<?php } ?>
<div class="container forum-head hidden-xs">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<a class="forum-logo" href="<?php echo s_url('?c=forum&a=index') ?>"><img src="img/forum/forum_logo/<?php echo $forum_city ?>.png"/></a>
			<a class="btn btn-default city" href="<?php echo s_url('?c=index&a=forum_city_choice') ?>">城市</a>
			<a class="pull-right hidden-xs" href="<?php echo APP_URL ?>"><img src="http://qr.liantu.com/api.php?bg=ffffff&fg=111111&el=l&w=60&m=0&text=<?php echo APP_URL ?>"/></a>
		</div>
	</div>
</div>
<?php } ?>
<div class="container">
	<nav class="navbar navbar-inverse navbar-2">
	<div class="navbar-header">
		<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-forum"> <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
		<li id="forum_kind">
		<a id="drop_forum_kind" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" onclick="get_forum_kind_nav()"><img class="visible-xs-inline" width="45px" src="img/forum/forum_logo/<?php echo $forum_city ?>.png"/> <span class="hidden-xs">分类</span></a>
		<ul id="menu_forum_kind" class="dropdown-menu" role="menu" aria-labelledby="drop_forum_kind">
			<!-- 板块分类加载区 -->	
		</ul>
		</li>
	</div>
	<div class="collapse navbar-collapse" id="navbar-collapse-forum">
		<ul class="nav navbar-nav">
			<?php global $config ?>
			<?php if(!empty($_SESSION['auth']) && (in_array($_SESSION['auth']['id'], $config['manager']) || $city_info['user_id'] == $_SESSION['auth']['id'])) { ?>
			<li id="forum_manage">
			<a id="forum_manage" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">管理</a>
			<ul id="menu_my" class="dropdown-menu" role="menu" aria-labelledby="forum_manage">
				<li id="forum_city_edit"><a href="?c=forum&a=forum_city_edit">城市</a></li>
				<li id="forum_kind_mng"><a href="?c=forum&a=forum_kind_manage">分类管理</a></li>
				<?php if (1 == $city_info['carousel']) { ?>
				<li id="forum_carousel_mng"><a href="?c=forum&a=forum_carousel_manage">滚动图管理</a></li>
				<?php } ?>
			</ul>
			</li>
			<?php } ?>
			<li id="forum_cal"><a href="<?php echo s_url('?c=forum&a=forum_cal') ?>">日历</a></li>
			<li id="forum_list"><a href="<?php echo s_url('?c=forum&a=forum_list') ?>">板块搜索</a></li>
			<li id="forum_follow_list"><a href="<?php echo s_url('?c=forum&a=forum_list&m_falter=2') ?>">我关注的板块</a></li>
		</ul>
		<ul class="nav navbar-nav navbar-right">
			<li id="get_forum">
			<a id="get_forum" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">获取板块</a>
			<ul id="menu_my" class="dropdown-menu" role="menu" aria-labelledby="get_forum">
				<li role="presentation" id="forum_add"><a role="menuitem" tabindex="-1" href="<?php echo s_url('?c=forum&a=forum_add') ?>">创建板块</a></li>
				<li role="presentation" id="forum_c_m_list"><a role="menuitem" tabindex="-1" href="<?php echo s_url('?c=forum&a=forum_list&m_falter=3') ?>">换主板块</a></li>
			</ul>
			</li>
			<li id="drop_my">
			<a id="drop_my" href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">我的</a>
			<ul id="menu_my" class="dropdown-menu" role="menu" aria-labelledby="drop_my">
				<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo s_url('?c=forum&a=topic_my_list') ?>">我的帖子</a></li>
				<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo s_url('?c=forum&a=topic_my_list&m_falter=1') ?>">我的订单</a></li>
				<li role="presentation" class="divider"></li>
				<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo s_url('?c=forum&a=forum_list&m_falter=1') ?>">我的板块</a></li>
			</ul>
			</li>
		</ul>
	</div>
	</nav>
</div>
